<?php
// $Id: Module.php 27 2010-11-16 12:49:54Z mjohnson60@gmail.com $

/**
 * @var int Enter description here ...
 */
define('MODULE_LOAD_INSTALL', 0);

/**
 * @var int Enter description here ...
 */
define('MODULE_LOAD_HOOK', 1);

/**
 * @var int Enter description here ...
 */
define('MODULE_LOAD_NORMAL', 2);

/**
 * Enter description here ...
 * 
 * @author Mark Phillip Johnson
 * @version 1.0
 * @copyright Copyright (c) 2010, markjohnson
 * @license http://www.gnu.org/licenses/gpl.html The GNU General Public License v3.0
 *
 */
abstract class Module extends Object
{
	/**
	 * @var string Enter description here ...
	 */
	protected $name = '';
	
	/**
	 * @var string Enter description here ...
	 */
	protected $displayName = '';
	
	/**
	 * @var int Enter description here ...
	 */
	protected $version = 1;
	
	/**
	 * @var unknown_type Enter description here ...
	 */
	protected static $description = '';

	/**
	 * Enter description here ...
	 * 
	 */
	public function __construct()
	{
		
	}

	/**
	 * Enter description here ...
	 * 
	 * @param string $hook
	 * @return boolean
	 */
	public function hooks($hook = '')
	{
		return method_exists($this, $hook) || method_exists(get_called_class(), $hook);
	}

	/**
	 * @return the $name
	 */
	public function name()
	{
		return $this->name;
	}

	/**
	 * @return the $version
	 */
	public function version()
	{
		return $this->version;
	}

	/**
	 * Enter description here ...
	 * 
	 * @param string $op
	 * @param Node $node
	 * @param User $account
	 * @return boolean
	 */
	public function access($op, $node, $account)
	{
		return TRUE;
	}

	/**
	 * Enter description here ...
	 * 
	 * @return array:
	 */
	public function actionInfo()
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 * @param int $aid
	 */
	public function actionsDelete($aid)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param array $actions
	 */
	public function actionsInfoAlter(&$actions)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @return array:
	 */
	public function block()
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 */
	public function boot()
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param mixed $a1
	 * @param string $op
	 */
	public function comment(&$a1, $op)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 */
	public function cron()
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param string $query
	 * @param string $primary_table
	 * @param string $primary_field
	 * @param array $args
	 */
	public function dbRewriteSql($query, $primary_table, $primary_field, $args)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @return array:
	 */
	public function elements()
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 * @param string $filepath
	 */
	public function fileDownload($filepath)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param string $op
	 * @param int $delta
	 * @param int $format
	 * @param string $text
	 * @param int $cache_id
	 * @return string
	 */
	public function filter($op, $delta = 0, $format = -1, $text = '', $cache_id = 0)
	{
		return $text;
	}

	/**
	 * Enter description here ...
	 * 
	 * @param int $delta
	 * @param int $format
	 * @param boolean $long
	 */
	public function filterTips($delta, $format, $long = FALSE)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @return multitype:
	 */
	public function flushCaches()
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 * @param int $main
	 * @return string
	 */
	public function footer($main = 0)
	{
		return '';
	}

	/**
	 * Enter description here ...
	 * 
	 * @param Form $form
	 * @param array $form_state
	 * @param string $form_id
	 */
	public function formAlter(&$form, &$form_state, $form_id)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @return array:
	 */
	public function forms()
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 * @return string
	 */
	public function help($path, $arg)
	{
		return '';
	}

	/**
	 * Enter description here ...
	 * 
	 * @return multitype:
	 */
	public function hook_info()
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 */
	public function init()
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $type
	 * @param unknown_type $object
	 * @param unknown_type $teaser
	 * @return multitype:
	 */
	public function link($type, $object, $teaser = FALSE)
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $links
	 * @param unknown_type $node
	 * @param unknown_type $comment
	 */
	public function linkAlter(&$links, $node, $comment = NULL)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $op
	 */
	public function locale($op = 'groups')
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $message
	 */
	public function mailAlter(&$message)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @return multitype:
	 */
	public function menu()
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $items
	 */
	public function menuAlter(&$items)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $item
	 * @param unknown_type $menu
	 */
	public function menuLinkAlter(&$item, $menu)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $node
	 */
	public function nodeAccessRecords($node)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $node
	 * @param unknown_type $op
	 * @param unknown_type $a3
	 * @param unknown_type $a4
	 */
	public function nodeApi(&$node, $op, $a3 = NULL, $a4 = NULL)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $account
	 * @param unknown_type $op
	 * @return multitype:
	 */
	public function nodeGrants($account, $op)
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 * @return multitype:
	 */
	public function nodeOperations()
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 * @return array:
	 */
	public function perm()
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $name
	 * @param unknown_type $uri
	 */
	public function ping($name = '', $uri = '')
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $account
	 */
	public function profileAlter(&$account)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param array $schema
	 */
	public function schemaAlter(&$schema)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $op
	 * @param unknown_type $keys
	 */
	public function search($op = 'search', $keys = NULL)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $text
	 * @return unknown
	 */
	public function searchPreprocess($text)
	{
		return $text;
	}

	/**
	 * Enter description here ...
	 * 
	 * @param string $destination
	 */
	public function shutdown($destination = NULL)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $info
	 * @param unknown_type $file
	 */
	public function systemInfoAlter(&$info, $file)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $op
	 * @param unknown_type $type
	 * @param unknown_type $array
	 */
	public function taxonomy($op, $type, $array = NULL)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $term
	 * @return string
	 */
	public function termPath($term)
	{
		return 'taxonomy/term/' . $term->tid;
	}

	/**
	 * Enter description here ...
	 * 
	 * @param array $existing
	 * @param string $type
	 * @param string $theme
	 * @param string $path
	 * @return array:
	 */
	public function theme(&$existing, $type, $theme, $path)
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $theme_registry
	 */
	public function themeRegistryAlter(&$theme_registry)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $item
	 * @param unknown_type $menu
	 */
	public function translatedMenuLinkAlter(&$item, $menu)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $links
	 * @param unknown_type $path
	 */
	public function translationLinkAlter(&$links, $path)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 */
	public function updateIndex()
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $projects
	 */
	public function updateProjectsAlter(&$projects)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $projects
	 */
	public function updateStatusAlter(&$projects)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $op
	 * @param unknown_type $edit
	 * @param unknown_type $account
	 * @param unknown_type $category
	 */
	public function user($op, &$edit, &$account, $category = NULL)
	{
	
	}

	/**
	 * Enter description here ...
	 * 
	 * @return multitype:
	 */
	public function userOperations()
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 * @return multitype:
	 */
	public function xmlrpc()
	{
		return array();
	}

	/**
	 * Enter description here ...
	 * 
	 * @param unknown_type $log_entry
	 */
	public function watchdog($log_entry)
	{
	
	}
}
